package br.ufal.ic.dao.hibernate;

import br.ufal.ic.core.CubistInformation;
import br.ufal.ic.dao.GenericHibernateDAO;
import br.ufal.ic.dao.UserDAO;
import br.ufal.ic.user.User;

/**
 *
 * @author Marcos Paulo
 */
public class UserHibernateDAO extends GenericHibernateDAO<User, String> implements UserDAO {


    public UserHibernateDAO() {
        super(User.class);
    }

    public User findByNickName(String nickName) {
        
        return (User) getSession().createQuery(
                "from users vo where vo.nickName = ?").
                setString(0, nickName).uniqueResult();
    }

    public User findByCubistInformation(CubistInformation information) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
